package com.wisecoach.gatewayplus.transaction;

/**
 * 对应Spring-TX的TransactionDefinition，主要用于
 * {@code @author:} wisecoach
 * {@code @date:} 2023/9/29 下午5:05
 * {@code @version:} 1.0.0
 */

public interface TransactionDefinition {
    int PROPAGATION_REQUIRED = 0;
    int PROPAGATION_SUPPORTS = 1;
    int PROPAGATION_MANDATORY = 2;
    int PROPAGATION_REQUIRES_NEW = 3;
    int PROPAGATION_NOT_SUPPORTED = 4;
    int PROPAGATION_NEVER = 5;
    int PROPAGATION_NESTED = 6;

    default int getPropagation() {return PROPAGATION_REQUIRED;}
}
